package com.per.mybootall.test;

import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: yyy
 * Date: 2022/4/20
 * Time: 10:53
 * Description:
 */
public class test20 {
    public static void main(String[] args) throws ParseException {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        SimpleDateFormat month=new SimpleDateFormat("MM");
        System.out.println(cn.hutool.core.date.DateUtil.endOfYear(new Date()));
//        long diffDay=   DateUtil.between(sdf.parse("2023-04-29"),sdf.parse("2024-04-29"), DateUnit.DAY);
//        System.out.println(diffDay);
        System.out.println(month.format(sdf.parse("2023-06-23")));
    }

}
